bitkeeper revision 1.1159.1.561 (420a44fbc4-bx17m5WWwDlyH93ab-g)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 9 Feb 2005 17:14:35 +0000 (17:14 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 9 Feb 2005 17:14:35 +0000 (17:14 +0000)
Some simple renaming. 'guestos' -> 'kernel'.
Signed-off-by: keir.fraser@cl.cam.ac.uk
29 files changed:
linux-2.4.29-xen-sparse/include/asm-xen/pgalloc.h
linux-2.6.10-xen-sparse/arch/xen/i386/kernel/smpboot.c
linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/segment.h
tools/libxc/xc_linux_build.c
tools/libxc/xc_linux_restore.c
tools/libxc/xc_plan9_build.c
tools/libxc/xc_vmx_build.c
xen/arch/x86/dom0_ops.c
xen/arch/x86/domain.c
xen/arch/x86/traps.c
xen/arch/x86/vmx_vmcs.c
xen/arch/x86/x86_32/domain_build.c
xen/arch/x86/x86_32/mm.c
xen/arch/x86/x86_64/asm-offsets.c
xen/arch/x86/x86_64/domain_build.c
xen/arch/x86/x86_64/entry.S
xen/arch/x86/x86_64/mm.c
xen/common/dom0_ops.c
xen/common/domain.c
xen/include/asm-x86/desc.h
xen/include/asm-x86/domain.h
xen/include/asm-x86/processor.h
xen/include/asm-x86/x86_32/regs.h
xen/include/asm-x86/x86_64/regs.h
xen/include/public/arch-x86_32.h
xen/include/public/arch-x86_64.h
xen/include/public/xen.h
xen/include/xen/domain.h
xen/include/xen/sched.h

index f6bee4d6895595670f9f8989430147f295b40648..4e9584e918cc06efed77441dc64b696f6c51ec83 100644 (file)
@@ -227,7 +227,7 @@ static inline void flush_tlb_range(struct mm_struct *mm,
 }
 
 #else
-#error no guestos SMP support yet...
+#error no kernel SMP support yet...
 #include <asm/smp.h>
 
 #define local_flush_tlb() \
index a9bb0e201b32f547ae8fccb2f6b5f76a8c09876d..4dd03ba6cd867a2e014897a92bfdcde0ddd39f05 100644 (file)
@@ -879,7 +879,7 @@ static int __init do_boot_cpu(int apicid)
        for ( i = 0; i < 256; i++ )
        {
                ctxt.trap_ctxt[i].vector = i;
-               ctxt.trap_ctxt[i].cs     = FLAT_GUESTOS_CS;
+               ctxt.trap_ctxt[i].cs     = FLAT_KERNEL_CS;
        }
        ctxt.fast_trap_idx = smp_trap_init(ctxt.trap_ctxt);
 
@@ -901,8 +901,8 @@ static int __init do_boot_cpu(int apicid)
        }
 
        /* Ring 1 stack is the initial stack. */
-       ctxt.guestos_ss  = __KERNEL_DS;
-       ctxt.guestos_esp = idle->thread.esp;
+       ctxt.kernel_ss  = __KERNEL_DS;
+       ctxt.kernel_esp = idle->thread.esp;
 
        /* Callback handlers. */
        ctxt.event_callback_cs     = __KERNEL_CS;
index 288243f05a273a72224e66a32dea99ddd38d659b..a9657fbe740ebf45fcb579d095e977bc7e573e0a 100644 (file)
@@ -82,9 +82,9 @@
 
 /* Simple and small GDT entries for booting only */
 
-#define __BOOT_CS      FLAT_GUESTOS_CS
+#define __BOOT_CS      FLAT_KERNEL_CS
 
-#define __BOOT_DS      FLAT_GUESTOS_DS
+#define __BOOT_DS      FLAT_KERNEL_DS
 
 /*
  * The interrupt descriptor table has room for 256 idt's,
index c75a0837b7c57daa799235fed66de16a1c0ecfbe..12753b78a6aedd07aeb0f02860e199766c51b246 100644 (file)
@@ -41,7 +41,7 @@ loadelfsymtab(
     char *elfbase, int xch, u32 dom, unsigned long *parray,
     struct domain_setup_info *dsi);
 
-static int setup_guestos(int xc_handle,
+static int setup_guest(int xc_handle,
                          u32 dom,
                          char *image, unsigned long image_size,
                          gzFile initrd_gfd, unsigned long initrd_len,
@@ -384,7 +384,7 @@ int xc_linux_build(int xc_handle,
         goto error_out;
     }
 
-    if ( setup_guestos(xc_handle, domid, image, image_size, 
+    if ( setup_guest(xc_handle, domid, image, image_size, 
                        initrd_gfd, initrd_size, nr_pages, 
                        &vstartinfo_start, &vkern_entry,
                        ctxt, cmdline,
@@ -406,19 +406,19 @@ int xc_linux_build(int xc_handle,
 
     /*
      * Initial register values:
-     *  DS,ES,FS,GS = FLAT_GUESTOS_DS
-     *       CS:EIP = FLAT_GUESTOS_CS:start_pc
-     *       SS:ESP = FLAT_GUESTOS_DS:start_stack
+     *  DS,ES,FS,GS = FLAT_KERNEL_DS
+     *       CS:EIP = FLAT_KERNEL_CS:start_pc
+     *       SS:ESP = FLAT_KERNEL_DS:start_stack
      *          ESI = start_info
      *  [EAX,EBX,ECX,EDX,EDI,EBP are zero]
      *       EFLAGS = IF | 2 (bit 1 is reserved and should always be 1)
      */
-    ctxt->cpu_ctxt.ds = FLAT_GUESTOS_DS;
-    ctxt->cpu_ctxt.es = FLAT_GUESTOS_DS;
-    ctxt->cpu_ctxt.fs = FLAT_GUESTOS_DS;
-    ctxt->cpu_ctxt.gs = FLAT_GUESTOS_DS;
-    ctxt->cpu_ctxt.ss = FLAT_GUESTOS_DS;
-    ctxt->cpu_ctxt.cs = FLAT_GUESTOS_CS;
+    ctxt->cpu_ctxt.ds = FLAT_KERNEL_DS;
+    ctxt->cpu_ctxt.es = FLAT_KERNEL_DS;
+    ctxt->cpu_ctxt.fs = FLAT_KERNEL_DS;
+    ctxt->cpu_ctxt.gs = FLAT_KERNEL_DS;
+    ctxt->cpu_ctxt.ss = FLAT_KERNEL_DS;
+    ctxt->cpu_ctxt.cs = FLAT_KERNEL_CS;
     ctxt->cpu_ctxt.eip = vkern_entry;
     ctxt->cpu_ctxt.esp = vstartinfo_start + 2*PAGE_SIZE;
     ctxt->cpu_ctxt.esi = vstartinfo_start;
@@ -431,7 +431,7 @@ int xc_linux_build(int xc_handle,
     for ( i = 0; i < 256; i++ )
     {
         ctxt->trap_ctxt[i].vector = i;
-        ctxt->trap_ctxt[i].cs     = FLAT_GUESTOS_CS;
+        ctxt->trap_ctxt[i].cs     = FLAT_KERNEL_CS;
     }
     ctxt->fast_trap_idx = 0;
 
@@ -442,16 +442,16 @@ int xc_linux_build(int xc_handle,
     ctxt->gdt_ents = 0;
 
     /* Ring 1 stack is the initial stack. */
-    ctxt->guestos_ss  = FLAT_GUESTOS_DS;
-    ctxt->guestos_esp = vstartinfo_start + 2*PAGE_SIZE;
+    ctxt->kernel_ss  = FLAT_KERNEL_DS;
+    ctxt->kernel_esp = vstartinfo_start + 2*PAGE_SIZE;
 
     /* No debugging. */
     memset(ctxt->debugreg, 0, sizeof(ctxt->debugreg));
 
     /* No callback handlers. */
-    ctxt->event_callback_cs     = FLAT_GUESTOS_CS;
+    ctxt->event_callback_cs     = FLAT_KERNEL_CS;
     ctxt->event_callback_eip    = 0;
-    ctxt->failsafe_callback_cs  = FLAT_GUESTOS_CS;
+    ctxt->failsafe_callback_cs  = FLAT_KERNEL_CS;
     ctxt->failsafe_callback_eip = 0;
 
     memset( &launch_op, 0, sizeof(launch_op) );
index 8909878f8141c337ba5482416373812c97eeba99..b381bf0638576c19797ed163dc54c840a34f2872 100644 (file)
@@ -603,7 +603,7 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt)
      *  4. fast_trap_idx is checked by Xen.
      *  5. ldt base must be page-aligned, no more than 8192 ents, ...
      *  6. gdt already done, and further checking is done by Xen.
-     *  7. check that guestos_ss is safe.
+     *  7. check that kernel_ss is safe.
      *  8. pt_base is already done.
      *  9. debugregs are checked by Xen.
      *  10. callback code selectors need checking.
@@ -612,14 +612,14 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt)
     {
         ctxt.trap_ctxt[i].vector = i;
         if ( (ctxt.trap_ctxt[i].cs & 3) == 0 )
-            ctxt.trap_ctxt[i].cs = FLAT_GUESTOS_CS;
+            ctxt.trap_ctxt[i].cs = FLAT_KERNEL_CS;
     }
-    if ( (ctxt.guestos_ss & 3) == 0 )
-        ctxt.guestos_ss = FLAT_GUESTOS_DS;
+    if ( (ctxt.kernel_ss & 3) == 0 )
+        ctxt.kernel_ss = FLAT_KERNEL_DS;
     if ( (ctxt.event_callback_cs & 3) == 0 )
-        ctxt.event_callback_cs = FLAT_GUESTOS_CS;
+        ctxt.event_callback_cs = FLAT_KERNEL_CS;
     if ( (ctxt.failsafe_callback_cs & 3) == 0 )
-        ctxt.failsafe_callback_cs = FLAT_GUESTOS_CS;
+        ctxt.failsafe_callback_cs = FLAT_KERNEL_CS;
     if ( ((ctxt.ldt_base & (PAGE_SIZE - 1)) != 0) ||
          (ctxt.ldt_ents > 8192) ||
          (ctxt.ldt_base > HYPERVISOR_VIRT_START) ||
index f3198097161732cf4f8ecc8c84ed50f11b99609b..0394938c1749638347605cb0dbeac8872d80e2e4 100755 (executable)
@@ -133,7 +133,7 @@ static int
 #define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
 
 static int
-setup_guestos(int xc_handle,
+setup_guest(int xc_handle,
              u32 dom,
              gzFile kernel_gfd,
              unsigned long tot_pages,
@@ -483,7 +483,7 @@ xc_plan9_build(int xc_handle,
        }
 
        DPRINTF(("xc_get_tot_pages returns %ld pages\n", tot_pages));
-       if (setup_guestos(xc_handle, domid, kernel_gfd, tot_pages,
+       if (setup_guest(xc_handle, domid, kernel_gfd, tot_pages,
                          &virt_startinfo_addr,
                          &load_addr, &st_ctxt, cmdline,
                          op.u.getdomaininfo.shared_info_frame,
@@ -502,19 +502,19 @@ xc_plan9_build(int xc_handle,
 
        /*
         * Initial register values:
-        *  DS,ES,FS,GS = FLAT_GUESTOS_DS
-        *       CS:EIP = FLAT_GUESTOS_CS:start_pc
-        *       SS:ESP = FLAT_GUESTOS_DS:start_stack
+        *  DS,ES,FS,GS = FLAT_KERNEL_DS
+        *       CS:EIP = FLAT_KERNEL_CS:start_pc
+        *       SS:ESP = FLAT_KERNEL_DS:start_stack
         *          ESI = start_info
         *  [EAX,EBX,ECX,EDX,EDI,EBP are zero]
         *       EFLAGS = IF | 2 (bit 1 is reserved and should always be 1)
         */
-       ctxt->cpu_ctxt.ds = FLAT_GUESTOS_DS;
-       ctxt->cpu_ctxt.es = FLAT_GUESTOS_DS;
-       ctxt->cpu_ctxt.fs = FLAT_GUESTOS_DS;
-       ctxt->cpu_ctxt.gs = FLAT_GUESTOS_DS;
-       ctxt->cpu_ctxt.ss = FLAT_GUESTOS_DS;
-       ctxt->cpu_ctxt.cs = FLAT_GUESTOS_CS;
+       ctxt->cpu_ctxt.ds = FLAT_KERNEL_DS;
+       ctxt->cpu_ctxt.es = FLAT_KERNEL_DS;
+       ctxt->cpu_ctxt.fs = FLAT_KERNEL_DS;
+       ctxt->cpu_ctxt.gs = FLAT_KERNEL_DS;
+       ctxt->cpu_ctxt.ss = FLAT_KERNEL_DS;
+       ctxt->cpu_ctxt.cs = FLAT_KERNEL_CS;
        ctxt->cpu_ctxt.eip = load_addr;
        ctxt->cpu_ctxt.eip = 0x80100020;
        /* put stack at top of second page */
@@ -530,7 +530,7 @@ xc_plan9_build(int xc_handle,
        /* Virtual IDT is empty at start-of-day. */
        for (i = 0; i < 256; i++) {
                ctxt->trap_ctxt[i].vector = i;
-               ctxt->trap_ctxt[i].cs = FLAT_GUESTOS_CS;
+               ctxt->trap_ctxt[i].cs = FLAT_KERNEL_CS;
        }
        ctxt->fast_trap_idx = 0;
 
@@ -542,16 +542,16 @@ xc_plan9_build(int xc_handle,
 
        /* Ring 1 stack is the initial stack. */
        /* put stack at top of second page */
-       ctxt->guestos_ss = FLAT_GUESTOS_DS;
-       ctxt->guestos_esp = ctxt->cpu_ctxt.esp;
+       ctxt->kernel_ss = FLAT_KERNEL_DS;
+       ctxt->kernel_esp = ctxt->cpu_ctxt.esp;
 
        /* No debugging. */
        memset(ctxt->debugreg, 0, sizeof (ctxt->debugreg));
 
        /* No callback handlers. */
-       ctxt->event_callback_cs = FLAT_GUESTOS_CS;
+       ctxt->event_callback_cs = FLAT_KERNEL_CS;
        ctxt->event_callback_eip = 0;
-       ctxt->failsafe_callback_cs = FLAT_GUESTOS_CS;
+       ctxt->failsafe_callback_cs = FLAT_KERNEL_CS;
        ctxt->failsafe_callback_eip = 0;
 
        memset(&launch_op, 0, sizeof (launch_op));
index 4ccc274c6819a410fd4b2e221c774d121964f4c0..c286febdf09445118629acd52214a9dadee243f3 100644 (file)
@@ -108,7 +108,7 @@ static void build_e820map(struct mem_map *mem_mapp, unsigned long mem_size)
     mem_mapp->nr_map = nr_map;
 }
 
-static int setup_guestos(int xc_handle,
+static int setup_guest(int xc_handle,
                          u32 dom, int memsize,
                          char *image, unsigned long image_size,
                          gzFile initrd_gfd, unsigned long initrd_len,
@@ -510,7 +510,7 @@ int xc_vmx_build(int xc_handle,
         goto error_out;
     }
 
-    if ( setup_guestos(xc_handle, domid, memsize, image, image_size, 
+    if ( setup_guest(xc_handle, domid, memsize, image, image_size, 
                        initrd_gfd, initrd_size, nr_pages, 
                        ctxt, cmdline,
                        op.u.getdomaininfo.shared_info_frame,
@@ -535,7 +535,7 @@ int xc_vmx_build(int xc_handle,
     for ( i = 0; i < 256; i++ )
     {
         ctxt->trap_ctxt[i].vector = i;
-        ctxt->trap_ctxt[i].cs     = FLAT_GUESTOS_CS;
+        ctxt->trap_ctxt[i].cs     = FLAT_KERNEL_CS;
     }
     ctxt->fast_trap_idx = 0;
 
@@ -547,16 +547,16 @@ int xc_vmx_build(int xc_handle,
 
     /* Ring 1 stack is the initial stack. */
 /*
-    ctxt->guestos_ss  = FLAT_GUESTOS_DS;
-    ctxt->guestos_esp = vstartinfo_start;
+    ctxt->kernel_ss  = FLAT_KERNEL_DS;
+    ctxt->kernel_esp = vstartinfo_start;
 */
     /* No debugging. */
     memset(ctxt->debugreg, 0, sizeof(ctxt->debugreg));
 
     /* No callback handlers. */
-    ctxt->event_callback_cs     = FLAT_GUESTOS_CS;
+    ctxt->event_callback_cs     = FLAT_KERNEL_CS;
     ctxt->event_callback_eip    = 0;
-    ctxt->failsafe_callback_cs  = FLAT_GUESTOS_CS;
+    ctxt->failsafe_callback_cs  = FLAT_KERNEL_CS;
     ctxt->failsafe_callback_eip = 0;
 
     memset( &launch_op, 0, sizeof(launch_op) );
index e019a5feb74eeb47f00882164d22806de57278c1..ea4328766847aff27bbd8519b63748282ea8c47c 100644 (file)
@@ -355,8 +355,8 @@ void arch_getdomaininfo_ctxt(
            sizeof(ed->arch.user_ctxt));
     if ( test_bit(EDF_DONEFPUINIT, &ed->ed_flags) )
         c->flags |= ECF_I387_VALID;
-    if ( GUESTOS_MODE(ed, &ed->arch.user_ctxt) )
-        c->flags |= ECF_IN_GUESTOS;
+    if ( KERNEL_MODE(ed, &ed->arch.user_ctxt) )
+        c->flags |= ECF_IN_KERNEL;
     memcpy(&c->fpu_ctxt,
            &ed->arch.i387,
            sizeof(ed->arch.i387));
@@ -381,8 +381,8 @@ void arch_getdomaininfo_ctxt(
                 l1_pgentry_to_pfn(ed->arch.perdomain_ptes[i]);
         c->gdt_ents = GET_GDT_ENTRIES(ed);
     }
-    c->guestos_ss  = ed->arch.guestos_ss;
-    c->guestos_esp = ed->arch.guestos_sp;
+    c->kernel_ss  = ed->arch.kernel_ss;
+    c->kernel_esp = ed->arch.kernel_sp;
     c->pt_base   = 
         pagetable_val(ed->arch.pagetable);
     memcpy(c->debugreg, 
index 17ca88531367e39a070630f65f2941bae8f16e4d..59c9dc1e927ea4c588c477d524f6f18d8b56e873 100644 (file)
@@ -288,7 +288,7 @@ void arch_do_createdomain(struct exec_domain *ed)
             mk_l3_pgentry(__pa(d->arch.mm_perdomain_l2) | __PAGE_HYPERVISOR);
 #endif
 
-        ed->arch.flags = TF_guestos_mode;
+        ed->arch.flags = TF_kernel_mode;
     }
 }
 
@@ -298,7 +298,7 @@ void arch_do_boot_vcpu(struct exec_domain *ed)
     ed->arch.schedule_tail = d->exec_domain[0]->arch.schedule_tail;
     ed->arch.perdomain_ptes = 
         d->arch.mm_perdomain_pt + (ed->eid << PDPT_VCPU_SHIFT);
-    ed->arch.flags = TF_guestos_mode;
+    ed->arch.flags = TF_kernel_mode;
 }
 
 #ifdef CONFIG_VMX
@@ -384,7 +384,7 @@ static void monitor_rm_pagetable(struct exec_domain *ed)
     ed->arch.monitor_table = mk_pagetable(0);
 }
 
-static int vmx_final_setup_guestos(struct exec_domain *ed,
+static int vmx_final_setup_guest(struct exec_domain *ed,
                                    full_execution_context_t *full_context)
 {
     int error;
@@ -439,7 +439,7 @@ out:
 }
 #endif
 
-int arch_final_setup_guestos(
+int arch_final_setup_guest(
     struct exec_domain *d, full_execution_context_t *c)
 {
     unsigned long phys_basetab;
@@ -449,9 +449,9 @@ int arch_final_setup_guestos(
     if ( c->flags & ECF_I387_VALID )
         set_bit(EDF_DONEFPUINIT, &d->ed_flags);
 
-    d->arch.flags &= ~TF_guestos_mode;
-    if ( c->flags & ECF_IN_GUESTOS )
-        d->arch.flags |= TF_guestos_mode;
+    d->arch.flags &= ~TF_kernel_mode;
+    if ( c->flags & ECF_IN_KERNEL )
+        d->arch.flags |= TF_kernel_mode;
 
     memcpy(&d->arch.user_ctxt,
            &c->cpu_ctxt,
@@ -485,8 +485,8 @@ int arch_final_setup_guestos(
     d->arch.ldt_base = c->ldt_base;
     d->arch.ldt_ents = c->ldt_ents;
 
-    d->arch.guestos_ss = c->guestos_ss;
-    d->arch.guestos_sp = c->guestos_esp;
+    d->arch.kernel_ss = c->kernel_ss;
+    d->arch.kernel_sp = c->kernel_esp;
 
     for ( i = 0; i < 8; i++ )
         (void)set_debugreg(d, i, c->debugreg[i]);
@@ -517,7 +517,7 @@ int arch_final_setup_guestos(
 
 #ifdef CONFIG_VMX
     if (c->flags & ECF_VMX_GUEST)
-        return vmx_final_setup_guestos(d, c);
+        return vmx_final_setup_guest(d, c);
 #endif
 
     return 0;
@@ -532,15 +532,15 @@ void new_thread(struct exec_domain *d,
 
     /*
      * Initial register values:
-     *  DS,ES,FS,GS = FLAT_GUESTOS_DS
-     *       CS:EIP = FLAT_GUESTOS_CS:start_pc
-     *       SS:ESP = FLAT_GUESTOS_SS:start_stack
+     *  DS,ES,FS,GS = FLAT_KERNEL_DS
+     *       CS:EIP = FLAT_KERNEL_CS:start_pc
+     *       SS:ESP = FLAT_KERNEL_SS:start_stack
      *          ESI = start_info
      *  [EAX,EBX,ECX,EDX,EDI,EBP are zero]
      */
-    ec->ds = ec->es = ec->fs = ec->gs = FLAT_GUESTOS_DS;
-    ec->ss = FLAT_GUESTOS_SS;
-    ec->cs = FLAT_GUESTOS_CS;
+    ec->ds = ec->es = ec->fs = ec->gs = FLAT_KERNEL_DS;
+    ec->ss = FLAT_KERNEL_SS;
+    ec->cs = FLAT_KERNEL_CS;
     ec->eip = start_pc;
     ec->esp = start_stack;
     ec->esi = start_info;
@@ -625,8 +625,8 @@ void switch_to(struct exec_domain *prev_p, struct exec_domain *next_p)
 
 #ifdef __i386__
         /* Switch the guest OS ring-1 stack. */
-        tss->esp1 = next_p->arch.guestos_sp;
-        tss->ss1  = next_p->arch.guestos_ss;
+        tss->esp1 = next_p->arch.kernel_sp;
+        tss->ss1  = next_p->arch.kernel_ss;
 #endif
 
         /* Switch page tables. */
@@ -738,15 +738,15 @@ void switch_to(struct exec_domain *prev_p, struct exec_domain *next_p)
               next_p->arch.user_ctxt.gs_base_app>>32);
 
     /* If in guest-OS mode, switch the GS bases around. */
-    if ( next_p->arch.flags & TF_guestos_mode )
+    if ( next_p->arch.flags & TF_kernel_mode )
         __asm__ __volatile__ ( "swapgs" );
 
     if ( unlikely(!all_segs_okay) )
     {
         unsigned long *rsp =
-            (next_p->arch.flags & TF_guestos_mode) ?
+            (next_p->arch.flags & TF_kernel_mode) ?
             (unsigned long *)stack_ec->rsp : 
-            (unsigned long *)next_p->arch.guestos_sp;
+            (unsigned long *)next_p->arch.kernel_sp;
 
         if ( put_user(stack_ec->ss,     rsp- 1) |
              put_user(stack_ec->rsp,    rsp- 2) |
@@ -764,9 +764,9 @@ void switch_to(struct exec_domain *prev_p, struct exec_domain *next_p)
             domain_crash();
         }
 
-        if ( !(next_p->arch.flags & TF_guestos_mode) )
+        if ( !(next_p->arch.flags & TF_kernel_mode) )
         {
-            next_p->arch.flags |= TF_guestos_mode;
+            next_p->arch.flags |= TF_kernel_mode;
             __asm__ __volatile__ ( "swapgs" );
             /* XXX switch page tables XXX */
         }
index cde6911646512b5e8e8e53aa841cf4c081bf309a..e23cea4b7b8bd0edec9101e2be7de9b11344fa66 100644 (file)
@@ -522,7 +522,7 @@ asmlinkage int do_general_protection(struct xen_regs *regs)
 
     /* Emulate some simple privileged instructions when exec'ed in ring 1. */
     if ( (regs->error_code == 0) &&
-         GUESTOS_MODE(ed, regs) &&
+         KERNEL_MODE(ed, regs) &&
          emulate_privileged_op(regs) )
         return 0;
 
index 1d5411bbfae196a4686c69bd3f048e944746e8c9..07af40ca24c0415a49f5fed13e76bb9f601ecdc7 100644 (file)
@@ -317,7 +317,7 @@ construct_init_vmcs_guest(execution_context_t *context,
     shadow_cr = host_env->cr0;
     shadow_cr &= ~(X86_CR0_PE | X86_CR0_PG);
     error |= __vmwrite(CR0_READ_SHADOW, shadow_cr);
-    /* CR3 is set in vmx_final_setup_guestos */
+    /* CR3 is set in vmx_final_setup_guest */
     error |= __vmwrite(GUEST_CR4, host_env->cr4);
     shadow_cr = host_env->cr4;
     shadow_cr &= ~(X86_CR4_PGE | X86_CR4_VMXE);
index 93ea520dfcdb25ff5b4328846e9d2f43bcc129b0..b6f8624d06e9438e38739b9f0aa88523da17e985 100644 (file)
@@ -218,11 +218,11 @@ int construct_dom0(struct domain *d,
      * We're basically forcing default RPLs to 1, so that our "what privilege
      * level are we returning to?" logic works.
      */
-    ed->arch.failsafe_selector = FLAT_GUESTOS_CS;
-    ed->arch.event_selector    = FLAT_GUESTOS_CS;
-    ed->arch.guestos_ss = FLAT_GUESTOS_SS;
+    ed->arch.failsafe_selector = FLAT_KERNEL_CS;
+    ed->arch.event_selector    = FLAT_KERNEL_CS;
+    ed->arch.kernel_ss = FLAT_KERNEL_SS;
     for ( i = 0; i < 256; i++ ) 
-        ed->arch.traps[i].cs = FLAT_GUESTOS_CS;
+        ed->arch.traps[i].cs = FLAT_KERNEL_CS;
 
     /* WARNING: The new domain must have its 'processor' field filled in! */
     l2start = l2tab = (l2_pgentry_t *)mpt_alloc; mpt_alloc += PAGE_SIZE;
index f3545ffdb9e13c047086c12dd33d8d7991f36f0b..7fc6323a93ed641d2e16b9f804ad6f4bc8de69b7 100644 (file)
@@ -202,8 +202,8 @@ long do_stack_switch(unsigned long ss, unsigned long esp)
     if ( (ss & 3) == 0 )
         return -EPERM;
 
-    current->arch.guestos_ss = ss;
-    current->arch.guestos_sp = esp;
+    current->arch.kernel_ss = ss;
+    current->arch.kernel_sp = esp;
     t->ss1  = ss;
     t->esp1 = esp;
 
@@ -224,7 +224,7 @@ int check_descriptor(struct desc_struct *d)
     /*
      * We don't allow a DPL of zero. There is no legitimate reason for 
      * specifying DPL==0, and it gets rather dangerous if we also accept call 
-     * gates (consider a call gate pointing at another guestos descriptor with 
+     * gates (consider a call gate pointing at another kernel descriptor with 
      * DPL 0 -- this would get the OS ring-0 privileges).
      */
     if ( (b & _SEGMENT_DPL) == 0 )
index 27d9e4d8575f8ad80254b17fc73c4db0cfae6948..fa816d26101cd89d44a6ef107f8da34cdfd0bddf 100644 (file)
@@ -49,7 +49,7 @@ void __dummy__(void)
     OFFSET(EDOMAIN_failsafe_addr, struct exec_domain, arch.failsafe_address);
     OFFSET(EDOMAIN_trap_bounce, struct exec_domain, arch.trap_bounce);
     OFFSET(EDOMAIN_thread_flags, struct exec_domain, arch.flags);
-    OFFSET(EDOMAIN_guestos_sp, struct exec_domain, arch.guestos_sp);
+    OFFSET(EDOMAIN_kernel_sp, struct exec_domain, arch.kernel_sp);
     BLANK();
 
     OFFSET(VCPUINFO_upcall_pending, vcpu_info_t, evtchn_upcall_pending);
index 0de83e825b291ddb42bcd4b1a05cfdbc299d6273..f84a3e0f9c67276b4a1dfead52cdf3e3c9f19650 100644 (file)
@@ -225,11 +225,11 @@ int construct_dom0(struct domain *d,
      * We're basically forcing default RPLs to 1, so that our "what privilege
      * level are we returning to?" logic works.
      */
-    ed->arch.failsafe_selector = FLAT_GUESTOS_CS;
-    ed->arch.event_selector    = FLAT_GUESTOS_CS;
-    ed->arch.guestos_ss = FLAT_GUESTOS_SS;
+    ed->arch.failsafe_selector = FLAT_KERNEL_CS;
+    ed->arch.event_selector    = FLAT_KERNEL_CS;
+    ed->arch.kernel_ss = FLAT_KERNEL_SS;
     for ( i = 0; i < 256; i++ ) 
-        ed->arch.traps[i].cs = FLAT_GUESTOS_CS;
+        ed->arch.traps[i].cs = FLAT_KERNEL_CS;
 
     /* WARNING: The new domain must have its 'processor' field filled in! */
     phys_to_page(mpt_alloc)->u.inuse.type_info = PGT_l4_page_table;
index 4ee4e648ed7de398812a44ee2172cd288dfb7e88..ccda5d7008ac6f163f468d561833349a434b2167 100644 (file)
@@ -152,10 +152,10 @@ process_softirqs:
 create_bounce_frame:
         /* Push new frame at existing %rsp if already in guest-OS mode. */
         movq  XREGS_rsp+8(%rsp),%rsi
-        testb $TF_guestos_mode,EDOMAIN_thread_flags(%rbx)
+        testb $TF_kernel_mode,EDOMAIN_thread_flags(%rbx)
         jnz   1f
         /* Push new frame at registered guest-OS stack top. */
-        movq  EDOMAIN_guestos_sp(%rbx),%rsi
+        movq  EDOMAIN_kernel_sp(%rbx),%rsi
 1:      movq  $HYPERVISOR_VIRT_START,%rax
         cmpq  %rax,%rsi
         jb    1f                        # In +ve address space? Then okay.
@@ -203,9 +203,9 @@ FLT15:  movq  %rax,(%rsi)               # RCX
         /* Rewrite our stack frame and return to guest-OS mode. */
         /* IA32 Ref. Vol. 3: TF, VM, RF and NT flags are cleared on trap. */
         movb  $0,TRAPBOUNCE_flags(%rdx)
-        testb $TF_guestos_mode,EDOMAIN_thread_flags(%rbx)
+        testb $TF_kernel_mode,EDOMAIN_thread_flags(%rbx)
         jnz   1f
-        orb   $TF_guestos_mode,EDOMAIN_thread_flags(%rbx)
+        orb   $TF_kernel_mode,EDOMAIN_thread_flags(%rbx)
         swapgs
         /* XXX switch page tables XXX */
 1:      movl  $TRAP_syscall,XREGS_entry_vector+8(%rsp)
index 4183442635b97adcc5c862a621208f0bc60bada7..52230df5bfa1630f2e8b09c2eabcfa21efe53bbe 100644 (file)
@@ -233,8 +233,8 @@ long do_stack_switch(unsigned long ss, unsigned long esp)
 {
     if ( (ss & 3) != 3 )
         return -EPERM;
-    current->arch.guestos_ss = ss;
-    current->arch.guestos_sp = esp;
+    current->arch.kernel_ss = ss;
+    current->arch.kernel_sp = esp;
     return 0;
 }
 
index e59bed3a3a83ce0f8aa4ac7840e8f4fea293f3ef..ddf38662a13e3545bd097a569dc593fcbde62295 100644 (file)
@@ -118,7 +118,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
         ret = -EINVAL;
         if ( d != NULL )
         {
-            ret = final_setup_guestos(d, &op->u.builddomain);
+            ret = final_setup_guest(d, &op->u.builddomain);
             put_domain(d);
         }
     }
index 6eee6931d436b1053426d2d876927958b3e654f9..2199ca98b721eb35089bb576312b5d1ba6331d98 100644 (file)
@@ -254,11 +254,11 @@ void domain_destruct(struct domain *d)
 
 
 /*
- * final_setup_guestos is used for final setup and launching of domains other
+ * final_setup_guest is used for final setup and launching of domains other
  * than domain 0. ie. the domains that are being built by the userspace dom0
  * domain builder.
  */
-int final_setup_guestos(struct domain *p, dom0_builddomain_t *builddomain)
+int final_setup_guest(struct domain *p, dom0_builddomain_t *builddomain)
 {
     int rc = 0;
     full_execution_context_t *c;
@@ -278,7 +278,7 @@ int final_setup_guestos(struct domain *p, dom0_builddomain_t *builddomain)
         goto out;
     }
     
-    if ( (rc = arch_final_setup_guestos(p->exec_domain[0],c)) != 0 )
+    if ( (rc = arch_final_setup_guest(p->exec_domain[0],c)) != 0 )
         goto out;
 
     /* Set up the shared info structure. */
@@ -293,7 +293,7 @@ int final_setup_guestos(struct domain *p, dom0_builddomain_t *builddomain)
 }
 
 /*
- * final_setup_guestos is used for final setup and launching of domains other
+ * final_setup_guest is used for final setup and launching of domains other
  * than domain 0. ie. the domains that are being built by the userspace dom0
  * domain builder.
  */
@@ -333,7 +333,7 @@ long do_boot_vcpu(unsigned long vcpu, full_execution_context_t *ctxt)
 
     sched_add_domain(ed);
 
-    if ( (rc = arch_final_setup_guestos(ed, c)) != 0 ) {
+    if ( (rc = arch_final_setup_guest(ed, c)) != 0 ) {
         sched_rem_domain(ed);
         goto out;
     }
index 53f4f91e1f1581209908f753368c5afc1c16292d..39732982a0b791c18e42965f8a560e6a0bfe2405 100644 (file)
@@ -18,7 +18,7 @@
       (((_s)>>3) >  LAST_RESERVED_GDT_ENTRY) ||                            \
       ((_s)&4)) &&                                                         \
      (((_s)&3) == 1))
-#define VALID_CODESEL(_s) ((_s) == FLAT_GUESTOS_CS || VALID_SEL(_s))
+#define VALID_CODESEL(_s) ((_s) == FLAT_KERNEL_CS || VALID_SEL(_s))
 
 /* These are bitmasks for the high 32 bits of a descriptor table entry. */
 #define _SEGMENT_TYPE    (15<< 8)
index fbbf0e9b219cc40e17baecb9a28cdb2ba66e4f41..a6e5a9e5b0d15b7ce7ba45fbf80626aeb99cacdc 100644 (file)
@@ -45,8 +45,8 @@ struct arch_domain
 
 struct arch_exec_domain
 {
-    unsigned long      guestos_sp;
-    unsigned long      guestos_ss;
+    unsigned long      kernel_sp;
+    unsigned long      kernel_ss;
 
     unsigned long      flags; /* TF_ */
 
index e462f5bb97550de2ef5829691abbbc0574fb36d3..30c6079e8523055cf3e7b07e5af50788052c316c 100644 (file)
 
 /* arch_exec_domain' flags values */
 #define TF_failsafe_return     1
-#define TF_guestos_mode        2
+#define TF_kernel_mode        2
 
 #ifndef __ASSEMBLY__
 
index 943a982b07ba92e0f600a6250c7e25c8167e2217..06991d4cc72c7880c468119b1a740774eb58876e 100644 (file)
@@ -10,6 +10,6 @@
 #define RING_2(_r)    (((_r)->cs & 3) == 2)
 #define RING_3(_r)    (((_r)->cs & 3) == 3)
 
-#define GUESTOS_MODE(_e, _r) (!VM86_MODE(_r) && RING_1(_r))
+#define KERNEL_MODE(_e, _r) (!VM86_MODE(_r) && RING_1(_r))
 
 #endif
index cf63ec49c4d6a805ac48c22265c721d7194bb4ab..5045c29cf17b24c57f18808e08e8d16de50c66a5 100644 (file)
@@ -10,6 +10,6 @@
 #define RING_2(_r)    (((_r)->cs & 3) == 2)
 #define RING_3(_r)    (((_r)->cs & 3) == 3)
 
-#define GUESTOS_MODE(_e, _r) ((_e)->arch.flags & TF_guestos_mode)
+#define KERNEL_MODE(_e, _r) ((_e)->arch.flags & TF_kernel_mode)
 
 #endif
index 9caffe3e3588755dfcf8593aaedf4a85f1d82d4a..524138fd09fc020cd63408665cdfbf9e743a9557 100644 (file)
@@ -54,9 +54,9 @@
 #define FLAT_RING3_DS 0x0833    /* GDT index 262 */
 #define FLAT_RING3_SS 0x0833    /* GDT index 262 */
 
-#define FLAT_GUESTOS_CS FLAT_RING1_CS
-#define FLAT_GUESTOS_DS FLAT_RING1_DS
-#define FLAT_GUESTOS_SS FLAT_RING1_SS
+#define FLAT_KERNEL_CS FLAT_RING1_CS
+#define FLAT_KERNEL_DS FLAT_RING1_DS
+#define FLAT_KERNEL_SS FLAT_RING1_SS
 #define FLAT_USER_CS    FLAT_RING3_CS
 #define FLAT_USER_DS    FLAT_RING3_DS
 #define FLAT_USER_SS    FLAT_RING3_SS
@@ -133,7 +133,7 @@ typedef u64 tsc_timestamp_t; /* RDTSC timestamp */
 typedef struct {
 #define ECF_I387_VALID (1<<0)
 #define ECF_VMX_GUEST  (1<<1)
-#define ECF_IN_GUESTOS (1<<2)
+#define ECF_IN_KERNEL (1<<2)
     unsigned long flags;
     execution_context_t cpu_ctxt;           /* User-level CPU registers     */
     char          fpu_ctxt[256];            /* User-level FPU registers     */
@@ -141,7 +141,7 @@ typedef struct {
     unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
     unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
     unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
-    unsigned long guestos_ss, guestos_esp;  /* Virtual TSS (only SS1/ESP1)  */
+    unsigned long kernel_ss, kernel_esp;  /* Virtual TSS (only SS1/ESP1)  */
     unsigned long pt_base;                  /* CR3 (pagetable base)         */
     unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
     unsigned long event_callback_cs;        /* CS:EIP of event callback     */
index 2f37fea6c0ae58e95ed966e3d832522eda5d3e94..6ebf988c3c4b2e586a77e48d8121b3699af9cc2a 100644 (file)
 #define FLAT_RING3_SS32 0x082b  /* GDT index 262 */
 #define FLAT_RING3_SS64 0x082b  /* GDT index 262 */
 
-#define FLAT_GUESTOS_DS64 FLAT_RING3_DS64
-#define FLAT_GUESTOS_DS32 FLAT_RING3_DS32
-#define FLAT_GUESTOS_DS   FLAT_GUESTOS_DS64
-#define FLAT_GUESTOS_CS64 FLAT_RING3_CS64
-#define FLAT_GUESTOS_CS32 FLAT_RING3_CS32
-#define FLAT_GUESTOS_CS   FLAT_GUESTOS_CS64
-#define FLAT_GUESTOS_SS64 FLAT_RING3_SS64
-#define FLAT_GUESTOS_SS32 FLAT_RING3_SS32
-#define FLAT_GUESTOS_SS   FLAT_GUESTOS_SS64
+#define FLAT_KERNEL_DS64 FLAT_RING3_DS64
+#define FLAT_KERNEL_DS32 FLAT_RING3_DS32
+#define FLAT_KERNEL_DS   FLAT_KERNEL_DS64
+#define FLAT_KERNEL_CS64 FLAT_RING3_CS64
+#define FLAT_KERNEL_CS32 FLAT_RING3_CS32
+#define FLAT_KERNEL_CS   FLAT_KERNEL_CS64
+#define FLAT_KERNEL_SS64 FLAT_RING3_SS64
+#define FLAT_KERNEL_SS32 FLAT_RING3_SS32
+#define FLAT_KERNEL_SS   FLAT_KERNEL_SS64
 
 #define FLAT_USER_DS64 FLAT_RING3_DS64
 #define FLAT_USER_DS32 FLAT_RING3_DS32
@@ -149,14 +149,14 @@ typedef u64 tsc_timestamp_t; /* RDTSC timestamp */
 typedef struct {
 #define ECF_I387_VALID (1<<0)
 #define ECF_VMX_GUEST  (1<<1)
-#define ECF_IN_GUESTOS (1<<2)
+#define ECF_IN_KERNEL (1<<2)
     unsigned long flags;
     execution_context_t cpu_ctxt;           /* User-level CPU registers     */
     char          fpu_ctxt[512];            /* User-level FPU registers     */
     trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
     unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
     unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
-    unsigned long guestos_ss, guestos_esp;  /* Virtual TSS (only SS1/ESP1)  */
+    unsigned long kernel_ss, kernel_esp;  /* Virtual TSS (only SS1/ESP1)  */
     unsigned long pt_base;                  /* CR3 (pagetable base)         */
     unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
     unsigned long event_callback_cs;        /* CS:EIP of event callback     */
index fa10d5326b8cd539ea977019806962bc8ab55e3e..c5543a2293e389ef0028b6420ebc7363ed21f144 100644 (file)
@@ -299,7 +299,7 @@ typedef struct
 } PACKED vcpu_info_t;                   /* 8 + arch */
 
 /*
- * Xen/guestos shared data -- pointer provided in start_info.
+ * Xen/kernel shared data -- pointer provided in start_info.
  * NB. We expect that this struct is smaller than a page.
  */
 typedef struct shared_info_st
index 0e28badba03786633cceab0dbf9babde42a03f17..15db59d73d929d7f408748592a1883136437f46c 100644 (file)
@@ -18,7 +18,7 @@ extern void arch_do_createdomain(struct exec_domain *ed);
 
 extern void arch_do_boot_vcpu(struct exec_domain *ed);
 
-extern int  arch_final_setup_guestos(
+extern int  arch_final_setup_guest(
     struct exec_domain *d, full_execution_context_t *c);
 
 extern void free_perdomain_pt(struct domain *d);
index 75af955c82e0c295d4aebbe503387a7ae5ce88f9..aa5e425f1658312ad7faa8821fe116c66e7d57c4 100644 (file)
@@ -222,7 +222,7 @@ extern int construct_dom0(struct domain *d,
                           unsigned long image_start, unsigned long image_len, 
                           unsigned long initrd_start, unsigned long initrd_len,
                           char *cmdline);
-extern int final_setup_guestos(struct domain *d, dom0_builddomain_t *);
+extern int final_setup_guest(struct domain *d, dom0_builddomain_t *);
 
 struct domain *find_domain_by_id(domid_t dom);
 struct domain *find_last_domain(void);